package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    /**
     * 批量新增套餐和菜品关系
     * @param setmealDishes
     */
    void save(List<SetmealDish> setmealDishes);

    /**
     * 根据套餐id查询套餐菜品关系
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
    List<SetmealDish> findBySetmealId(Long setmealId);

    /**
     * 根据套餐id删除
     * @param ids
     */
    void delete(List<Long> ids);
}
